package com.visizen.wisdomclass.server.client;

import com.visizen.wisdomclass.server.model.WcInformAttach;
import com.visizen.wisdomclass.server.model.WcInformAttachExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WcInformAttachMapper {
    @SelectProvider(type=WcInformAttachSqlProvider.class, method="countByExample")
    int countByExample(WcInformAttachExample example);

    @DeleteProvider(type=WcInformAttachSqlProvider.class, method="deleteByExample")
    int deleteByExample(WcInformAttachExample example);

    @Delete({
        "delete from wc_inform_attach",
        "where ID = #{ID,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long ID);

    @Insert({
        "insert into wc_inform_attach (ID, INFORM_ID, ",
        "ATTACH_ID)",
        "values (#{ID,jdbcType=BIGINT}, #{INFORM_ID,jdbcType=VARCHAR}, ",
        "#{ATTACH_ID,jdbcType=VARCHAR})"
    })
    int insert(WcInformAttach record);

    @InsertProvider(type=WcInformAttachSqlProvider.class, method="insertSelective")
    int insertSelective(WcInformAttach record);

    @SelectProvider(type=WcInformAttachSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="ID", property="ID", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="INFORM_ID", property="INFORM_ID", jdbcType=JdbcType.VARCHAR),
        @Result(column="ATTACH_ID", property="ATTACH_ID", jdbcType=JdbcType.VARCHAR)
    })
    List<WcInformAttach> selectByExample(WcInformAttachExample example);

    @Select({
        "select",
        "ID, INFORM_ID, ATTACH_ID",
        "from wc_inform_attach",
        "where ID = #{ID,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="ID", property="ID", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="INFORM_ID", property="INFORM_ID", jdbcType=JdbcType.VARCHAR),
        @Result(column="ATTACH_ID", property="ATTACH_ID", jdbcType=JdbcType.VARCHAR)
    })
    WcInformAttach selectByPrimaryKey(Long ID);

    @UpdateProvider(type=WcInformAttachSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WcInformAttach record, @Param("example") WcInformAttachExample example);

    @UpdateProvider(type=WcInformAttachSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") WcInformAttach record, @Param("example") WcInformAttachExample example);

    @UpdateProvider(type=WcInformAttachSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WcInformAttach record);

    @Update({
        "update wc_inform_attach",
        "set INFORM_ID = #{INFORM_ID,jdbcType=VARCHAR},",
          "ATTACH_ID = #{ATTACH_ID,jdbcType=VARCHAR}",
        "where ID = #{ID,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(WcInformAttach record);
}